{layout name="common@common_layout/template" /}
<section class="panel panel-default">
    <div class="row wrapper">
        <div class="col-sm-2">
            <a href="{:url('public_module/rule/show_rule',['department_id'=>$department_id])}" class="btn btn-success">{$now_name}管理制度</a>
        </div>
        <div class="col-sm-offset-3 col-sm-7" style="font-size: 26px; font-weight: bold;">
            {$now_name}管理制度
        </div>
    </div>
    <div class="row wrapper">
        <label class="col-sm-2 control-label content_center">标题</label>
        <div class="col-sm-6">
            <input type="text" class="form-control" name="title" placeholder="请输入制度的标题" data-department_id = "{$department_id}">
        </div>
    </div>
    <div class="row wrapper">
        <div class="form-group">
            <label class="col-sm-2 control-label content_center">内容</label>
            <div class="col-sm-8">
                <div class="btn-toolbar m-b-sm btn-editor" data-role="editor-toolbar" data-target="#editor">
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" title="Font"><i
                                class="fa fa-font"></i><b class="caret"></b></a>
                        <ul class="dropdown-menu">
                        </ul>
                    </div>
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" title="Font Size"><i
                                class="fa fa-text-height"></i>&nbsp;<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a data-edit="fontSize 5"><font size="5">Huge</font></a></li>
                            <li><a data-edit="fontSize 3"><font size="3">Normal</font></a></li>
                            <li><a data-edit="fontSize 1"><font size="1">Small</font></a></li>
                        </ul>
                    </div>
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i
                                class="fa fa-bold"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i
                                class="fa fa-italic"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="strikethrough" title="Strikethrough"><i
                                class="fa fa-strikethrough"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i
                                class="fa fa-underline"></i></a>
                    </div>
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm" data-edit="insertunorderedlist" title="Bullet list"><i
                                class="fa fa-list-ul"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="insertorderedlist" title="Number list"><i
                                class="fa fa-list-ol"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="outdent" title="Reduce indent (Shift+Tab)"><i
                                class="fa fa-dedent"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="indent" title="Indent (Tab)"><i
                                class="fa fa-indent"></i></a>
                    </div>
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm" data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)"><i
                                class="fa fa-align-left"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"><i
                                class="fa fa-align-center"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"><i
                                class="fa fa-align-right"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"><i
                                class="fa fa-align-justify"></i></a>
                    </div>
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i
                                class="fa fa-link"></i></a>
                        <div class="dropdown-menu">
                            <div class="input-group m-l-xs m-r-xs">
                                <input class="form-control input-sm" placeholder="URL" type="text"
                                       data-edit="createLink"/>
                                <div class="input-group-btn">
                                    <button class="btn btn-default btn-sm" type="button">Add</button>
                                </div>
                            </div>
                        </div>
                        <a class="btn btn-default btn-sm" data-edit="unlink" title="Remove Hyperlink"><i
                                class="fa fa-cut"></i></a>
                    </div>

                    <div class="btn-group hide">
                        <a class="btn btn-default btn-sm" title="Insert picture (or just drag & drop)"
                           id="pictureBtn"><i class="fa fa-picture-o"></i></a>
                        <input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage"/>
                    </div>
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i
                                class="fa fa-undo"></i></a>
                        <a class="btn btn-default btn-sm" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i
                                class="fa fa-repeat"></i></a>
                    </div>
                </div>
                <div id="editor" class="form-control" style="overflow-y:scroll; height:150px;max-width:100%">
                </div>
            </div>
        </div>
    </div>
    <div class="row wrapper">
        <div class="form-group" style="margin-bottom: 40px;">
            <div class="col-sm-5 col-sm-offset-2">
                <a href="{:url('public_module/rule/show_rule',['department_id'=>$department_id])}"
                   class="btn btn-default">返回</a>
                <button style="margin-left: 10px;" class="btn btn-primary save_rule">保存</button>
            </div>
        </div>
    </div>
</section>
<script src="/static/js/rule/rule.js" type="text/javascript" charset="utf-8"></script>